<!DOCTYPE html>
<html>
<head>
    <title>{$name} {$seo_title} {$site_name}</title>
    <meta name="keywords" content="日新活动,圆桌会议,物业经济,新零售" />
    <meta name="description" content="日新网—让新生活更近一点，让科技落地更从容一点。旗下拥有创新行业资讯日新网、
            创新专业培训日新研习社、创新企业孵化成长日新商脉三款产品，以住宅、商业地产、
            写字楼等不同业态物业经营的增效减能与增值创新以及服务标准化、
            物业智能化、信息化等策略方向的创新为主要研究内容，共同助力日新网成为物业行业创新风向标。">
    <tc_include file="Public:head" />
    <link href="/public/css/sl_style.css?v={$SOURCE_VERSION}" rel="stylesheet"/>
    <style>
        .list-group {
            margin-left: 76px;
            margin-top: -20px;
        }
        .question_back_nav {
            height: 40px;
            width: 830px;
            line-height: 48px;
            border-bottom: 1px solid #c5c5c5;
        }
        .question_back_nav li {
            height: 100%;
            line-height:48px;
            width: 25%;
            font-size: 16px;

        }

        /*个人的中心布局样式调整*/
        .container {
            width: 1190px;
        }
        .row {
            margin-left: 0px;
            width: 1190px;

        }
        .span3 {
            margin-left: 0;
            width: 280px;
        }
        .span9 {
            width: 830px;
            margin-left: 80px;
        }
        /*个人的中心布局样式调整结束*/
        /*活动支付开始*/
        .active_item {
            margin:18px 0 24px;
            padding:0 12px 10px;
            border-bottom: 1px solid #efefef;
            overflow: hidden;
        }
        .active_item .picture {
            width: 175px;
            height: 100px;
            float: left;
        }
        .active_item .picture img {
            width: 175px;
            height: 100px;
        }
        .active_item .rightarea {
            margin-left: 190px;
        }
        .active_item .rightarea {
            font-size: 12px;
            color: #c5c5c5;
            line-height: 16px;
        }
        .active_item .rightarea h3 {
            font-size: 24px;
            line-height: 28px;
            color: #333333;
        }
        .active_item .rightarea .timer {
            margin-top: 8px;
            line-height: 12px;
        }
        .active_item .rightarea .address {
            margin-top: 4px;
            line-height: 12px;
        }
        .active_item .rightarea .btm {
            margin-top: 20px;
        }
        .active_item .rightarea .cancel,.active_item .rightarea .pay,.active_item .rightarea .refund,.active_item .rightarea .exchange,.active_item .rightarea .normal  {
            float: right;
            margin-left: 24px;
            font-size: 12px;
            color: #5d8dfe;
            font-weight: bold;
            letter-spacing: 1px;
        }
        /*取消订单样式*/
        .cancel_active {
            color: #a9a9a9!important;
        }
        /*隐藏类名*/
        .no_display {
            display: none;
        }
    </style>
    <!-- 弹窗css-->
    <style>
        *{
            margin:0;
            padding: 0;
        }
        .payment {
            width: 1054px;
            height: 660px;
            background-image:url("./public/images/img/btm_bg.png"), url("./public/images/img/payment.png") ;
            background-repeat: no-repeat;
            background-position: -90px  276px ,center;
            /*border: 1px solid #a9a9a9;*/
            position: relative;
            display: none;

        }
        .payment .title {
            width: 460px;
            height: 54px;
            margin: 0 auto 0;
            color: #fff;
            font-size: 18px;
            line-height: 22px;
            letter-spacing: 1px;
            padding-top: 106px;
        }
        .qr_code {
            width: 270px;
            height: 270px;
            margin: 0 auto;
            margin-top: 40px;
        }
        .qr_code img {
            width: 100%;
            height: 100%;
        }
        .layui-layer-btn {
            margin-top: -30px;
            letter-spacing: 4px;
        }
        .layui-layer-btn a {
            display: inline-block;
            width: 80px;
            height:30px ;
            padding: 0!important;

        }
        .layui-layer-btn1 {
            margin-left: 40px!important;
            background-color: #FFFFFF!important;
            color: #000232!important;
            border: 1px solid #000232;
        }
        /*退票弹窗*/
        .refund_ticket {
            /*width: 826px;*/
            /*height: 378px;*/
            display: none;
        }
        .red {
            color: red;
        }
    </style>
</head>
<body>
<tc_include file="Public:nav" />
<div class="container tc-main"  style="margin-top: 90px;>
        <div class="row">
<div class="span3">
    <tc_include file="Public:usernav"/>
</div>
<div class="alone_center span9">

    <ul class="question_back_nav clearfix" id="question_back_nav">
        <volist name="count_index" id="vo">
            <a href="{:U('Order/Order/activity_lists', ['status' => $vo['status'], 'type' => 1])}"><li>{$vo.btn}(<span>{$vo.count}</span>)</li></a>
        </volist>
    </ul>
    <div id="question_back_content">

        <div class="question_back_content list_content">
            <ul class="ul_items">
                <volist name="lists" id="vo">
                    <li class="active_item">
                        <a href="{$vo.link_addr}">
                            <div class="picture">
                                <img src="{$vo.img}" alt="">
                            </div>
                        </a>
                        <div class="rightarea">
                            <a href="{$vo.link_addr}"><h3>{$vo.act_name}</h3></a>
                            <p class="timer"><span>{$vo.start_time}</span> ~ <span>{$vo.end_time}</span></p>
                            <p class="address"><span>{$vo.city_name}</span></p>
                            <div class="btm">
                                <span class="state {$vo['act_status']['status'] != 3 ? "red" : ''}">{$vo.act_status.des}</span>

                                <if condition="$vo['sub_menu']['pay']['status'] == 1">
                                    <a href="javascript:;"><span class="pay" data-order-id="{$vo.id}">去支付</span></a>
                                </if>

                                <if condition="$vo['sub_menu']['cancel_order']['status'] == 1">
                                    <a href="{:U('Order/Order/order_refund', ['id' => $vo['id']])}"><span class="cancel">取消订单</span></a>
                                </if>

                                <if condition="$vo['sub_menu']['refund_order']['status'] == 1">
                                    <a><span class="refund">退票退款</span></a>
                                </if>

                                <if condition="$vo['sub_menu']['exchange']['status'] == 1">
                                    <a><span class="exchange" data-order-id="{$vo.id}">我要兑票</span></a>
                                </if>

                                <if condition="$vo['sub_menu']['refund_check']['status'] == 1">
                                    <span class="normal">退款审核中</span>
                                </if>

                                <if condition="$vo['sub_menu']['has_exchange']['status'] == 1">
                                    <span class="normal">已出票</span>
                                </if>

                                <if condition="$vo['sub_menu']['has_refund']['status'] == 1">
                                    <span class="normal">已退款</span>
                                </if>

                                <if condition="$vo['sub_menu']['refund_fail']['status'] == 1">
                                    <span class="normal">审核失败</span>
                                </if>
                            </div>
                        </div>
                    </li>
                </volist>
            </ul>
            <if condition="empty($lists)">
                <div style="width: 350px;height: 266px;margin: 40px auto 0;"><img src="/public/images/img/replace.png" alt="" style="width: 100%;height: auto;"></div>
            </if>
        </div>
        <div style="width:110px;height: 30px;border-radius: 15px;border: 1px solid #C8161D; color: #C8161D;font-size: 15px;text-align: center;
                line-height: 30px;margin-left: 350px; " class="js-infinite-scroll-loading text-center fontmsyhbd">更多</div>
        <div id="nextpage"></div>
    </div>
</div>
</div>
<!--付款码弹窗-->
<div class="payment" id="payment">
    <p class="title"></p>
    <div class="qr_code">
        <img data-src="{:U('Activity/Activity/activity_buy_ticket', ['pay_type' => 1])}" alt="">
    </div>
</div>
<!--退票弹窗 -->
<div class="refund_ticket">
    <p class="title"></p>
    <div class="qr_code">
        <img src="{$refund_qrcode}" alt="">
        <span style="margin-left: 50px;">请在移动端完成退款退票</span>
    </div>
</div>
<!--兑换二维码-->
<div class="exchange_qrcode" style="display: none">
    <p class="title"></p>
    <div class="qr_code">
        <img data-src="{:U('Activity/Activity/get_exchange_qrcode')}" alt="">
        <span style="margin-left: 50px;">请将二维码展示给工作人员</span>
    </div>
</div>
<tc_include file="Public:footer" />
<tc_include file="Public:scripts" />
<script src="__TMPL__Public/assets/js/masonry.pkgd.min.js"></script>
<script src="__TMPL__Public/assets/js/jquery.infiniteScroll.js"></script>
<script src="__PUBLIC__/js/layer/layer_1.js"></script>
<script>
    // 去支付
    $('body').delegate('.pay', 'click', function () {
        var order_id    = $(this).attr('data-order-id');
        var img         = $('#payment').find('img');
        var src         = img.attr('data-src') + "&order_id=" + order_id;

        $.post(src, {}, function (re) {
            if (typeof(re) != 'string') {
                layer.msg(re.info);
                return;
            } else {
                img.attr('src', src);
                layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    area: ['1054px',"730px"],
                    btn: ['完成', '取消'],
                    shadeClose: false,
                    content: $('.payment'),
                    yes: function (index) {
                        window.location.reload();
                        layer.close(index);
                    }
                });
            }
        });
    });

    // 退票退款
    $('body').delegate('.refund', 'click', function () {
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: ['826px', "410px"],
            btn: [],
            shadeClose: true,
            content: $('.refund_ticket'),
        });
    });
    
    $('body').delegate('.exchange', 'click', function () {
        var order_id    = $(this).attr('data-order-id');
        var img         = $('.exchange_qrcode').find('img');
        var src         = img.attr('data-src') + "&order_id=" + order_id;
        img.attr('src', src);
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: ['826px', "410px"],
            shadeClose: true,
            content: $('.exchange_qrcode'),
        });
    });

</script>
<script type="text/javascript">
    $(function () {
        var index = "{$list_index}";
        // tab显示背景
        $('#question_back_nav li:eq(' + (index - 1) + ')').addClass('active');

        // 加载更多
        $('#nextpage').infiniteScroll({
            loading:'.js-infinite-scroll-loading',
            total_pages:{$total_page},
            success:function(content){
                var $items = $(content).find('.active_item');
                if ($items.length > 0) {
                    $('.ul_items').append($items);
                }
            }
        });
    })
</script>
<script>
    $(function () {
        setTimeout(anim,500);
        function anim(){
            $(".animate_center_question").find(".menu_main").animate({
                marginLeft:'-64px'
            },200);
            $(".animate_center_question").find(".menu_list").animate({
                height:"54px",
                paddingTop:'12px',
                marginLeft:'10px'
            },200);
            $(".animate_center_question").find(".tab_sport").addClass("active");
        }
    })
</script>

</body>
</html>